/*
* $Id: FamiliesTable.h 95 2010-05-27 20:18:24Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _FAMILIES_TABLE_H_
#define _FAMILIES_TABLE_H_

#include "../Table.h"
#include "../Operation.h"

class CFamiliesTable : public CTable, public CFillContent
{
public:
	CFamiliesTable();
	virtual ~CFamiliesTable();
public:
	struct content : public CTable::content{
		std::tstring s_strName;
		int s_nIdPoint;
		std::tstring s_strNote;
		enum type{
			DEFAULT = 0,
			PEDIGREE,
			BREEDING,
			FATHER,
			AMADOU,
			BARREN,
			QUEEN_CELL,
			QUEEN_CELL_SMALL,
			INDIVIDUAL_PROVINE,
			COMBINED_PROVINE,
			PACKET,
			NON_QUEEN,
			SWARM,
			USER
		}s_type;
		int s_nIdRecord;
		content();
		virtual void Clear();
		virtual void Set(const std::vector<CTableItem>& aContent);
		virtual void Free();
	}m_content;
public:
	virtual void CreateTable(IDatabase* pDatabase);
	virtual void UpdateValue(IDatabase* pDatabase);
	virtual IResult* GetValue(IDatabase* pDatabase);
	virtual void SetValue(IDatabase* pDatabase);
	virtual void DeleteValue(IDatabase* pDatabase);
	virtual IOperation::i_content* CreateContent();
	std::tstring GetStringType(content::type nType);
};

#endif/*_FAMILIES_TABLE_H_*/